#ifndef HTTP_CLIENT_H
#define HTTP_CLIENT_H

#ifdef __cplusplus
extern "C" {
#endif

// 错误码定义
#define HTTP_SUCCESS 0
#define HTTP_ERROR_NETWORK 1
#define HTTP_ERROR_INVALID_URL 2
#define HTTP_ERROR_REQUEST_FAILED 3
#define HTTP_ERROR_MEMORY 4

// 回调函数类型定义
typedef void (*HttpCallback)(const char* response, int error_code);

// 导出函数声明
void http_get_async(const char* url, HttpCallback callback);

#ifdef __cplusplus
}
#endif

#endif // HTTP_CLIENT_H
